package com.tora.koans;

import org.junit.Assert;

public final class ImplementationStub {
    public static final Object __ = new Object();

    static public void assertTrue(String message, Object condition) {
	if (condition == __) {
	    throw new Error("Unimplemented test!");
	}
	try {
	    Assert.assertTrue(message, (Boolean) condition);
	} catch (Throwable t) {
	    throw new AssertionError();
	}
    }

    static public void assertTrue(Object condition) {
	if (condition == __) {
	    throw new Error("Unimplemented test!");
	}
	try {
	    Assert.assertTrue((Boolean) condition);
	} catch (Throwable t) {
	    throw new AssertionError();
	}
    }

    static public void assertFalse(String message, Object condition) {
	if (condition == __) {
	    throw new Error("Unimplemented test!");
	}
	try {
	    Assert.assertFalse(message, (Boolean) condition);
	} catch (Throwable t) {
	    throw new AssertionError();
	}
    }

    static public void assertFalse(Object condition) {
	if (condition == __) {
	    throw new Error("Unimplemented test!");
	}
	try {
	    Assert.assertFalse((Boolean) condition);
	} catch (Throwable t) {
	    throw new AssertionError();
	}
    }

    static public void assertEquals(String message, Object expected, Object actual) {
	if (actual == __) {
	    throw new Error("Unimplemented test!");
	}
	try {
	    Assert.assertEquals(message, expected, actual);
	} catch (Throwable t) {
	    throw new AssertionError();
	}
    }

    static public void assertEquals(Object expected, Object actual) {
	if (actual == __) {
	    throw new Error("Unimplemented test!");
	}
	try {
	    Assert.assertEquals(expected, actual);
	} catch (Throwable t) {
	    throw new AssertionError();
	}
    }

    static public void assertEquals(String message, double expected, Object actual, double delta) {
	if (actual == __) {
	    throw new Error("Unimplemented test!");
	}
	try {
	    Assert.assertEquals(message, expected, ((Number) actual).doubleValue(), delta);
	} catch (Throwable t) {
	    throw new AssertionError();
	}
    }

    static public void assertEquals(long expected, Object actual) {
	if (actual == __) {
	    throw new Error("Unimplemented test!");
	}
	try {
	    Assert.assertEquals(expected, ((Number) actual).longValue());
	} catch (Throwable t) {
	    throw new AssertionError();
	}
    }
    
    static public void assertEquals(String message, long expected, Object actual) {
	if (actual == __) {
	    throw new Error("Unimplemented test!");
	}
	try {
	    Assert.assertEquals(message, expected, ((Number) actual).longValue());
	} catch (Throwable t) {
	    throw new AssertionError();
	}
    }
    
    @Deprecated
    static public void assertEquals(double expected, Object actual) {
	if (actual == __) {
	    throw new Error("Unimplemented test!");
	}
	try {
	    Assert.assertEquals(expected, ((Number) actual).doubleValue());
	} catch (Throwable t) {
	    throw new AssertionError();
	}
    }

    @Deprecated
    static public void assertEquals(String message, double expected, Object actual) {
	if (actual == __) {
	    throw new Error("Unimplemented test!");
	}
	try {
	    Assert.assertEquals(message, expected, ((Number) actual).doubleValue());
	} catch (Throwable t) {
	    throw new AssertionError();
	}
    }

    static public void assertEquals(double expected, Object actual, double delta) {
	if (actual == __) {
	    throw new Error("Unimplemented test!");
	}
	try {
	    Assert.assertEquals(expected, ((Number) actual).doubleValue(), delta);
	} catch (Throwable t) {
	    throw new AssertionError();
	}
    }

    static public void assertNotNull(String message, Object object) {
	if (object == __) {
	    throw new Error("Unimplemented test!");
	}
	try {
	    Assert.assertNotNull(message, object);
	} catch (Throwable t) {
	    throw new AssertionError();
	}
    }

    static public void assertNotNull(Object object) {
	if (object == __) {
	    throw new Error("Unimplemented test!");
	}
	try {
	    Assert.assertNotNull(object);
	} catch (Throwable t) {
	    throw new AssertionError();
	}
    }

    static public void assertNull(String message, Object object) {
	if (object == __) {
	    throw new Error("Unimplemented test!");
	}
	try {
	    Assert.assertNull(message, object);
	} catch (Throwable t) {
	    throw new AssertionError();
	}
    }

    static public void assertNull(Object object) {
	if (object == __) {
	    throw new Error("Unimplemented test!");
	}
	try {
	    Assert.assertNull(object);
	} catch (Throwable t) {
	    throw new AssertionError();
	}
    }

    static public void assertSame(String message, Object expected, Object actual) {
	if (actual == __) {
	    throw new Error("Unimplemented test!");
	}
	try {
	    Assert.assertSame(message, expected, actual);
	} catch (Throwable t) {
	    throw new AssertionError();
	}
    }

    static public void assertSame(Object expected, Object actual) {
	if (actual == __) {
	    throw new Error("Unimplemented test!");
	}
	try {
	    Assert.assertSame(expected, actual);
	} catch (Throwable t) {
	    throw new AssertionError();
	}
    }

    static public void assertNotSame(String message, Object unexpected, Object actual) {
	if (actual == __) {
	    throw new Error("Unimplemented test!");
	}
	try {
	    Assert.assertNotSame(message, unexpected, actual);
	} catch (Throwable t) {
	    throw new AssertionError();
	}
    }

    static public void assertNotSame(Object unexpected, Object actual) {
	if (actual == __) {
	    throw new Error("Unimplemented test!");
	}
	try {
	    Assert.assertNotSame(unexpected, actual);
	} catch (Throwable t) {
	    throw new AssertionError();
	}
    }

    static public void fail(String message) {
	Assert.fail(message);
    }

    static public void fail() {
	Assert.fail();
    }
}
